package com.mtw.bbs.bbsUser.pojo.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;

import com.mtw.bbs.common.jdbcBase.entity.BaseEntity;
import com.mtw.bbs.userAdmin.pojo.vo.RoleVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import lombok.Data;

/**
 * 角色
 *
 * @author mo
 * @email mo
 * @date 2023-10-18 15:44:13
 */
@Data
@TableName("os_role")
@ApiModel("角色")
public class Role extends BaseEntity implements Serializable{
	private static final long serialVersionUID = 1L;

	/**
	 * 主键
	 */
	@TableId
	@ApiModelProperty(value = "主键")
	private String id;
	/**
	 * 角色类型
	 */
	@ApiModelProperty(value = "角色类型")
	private Integer roleType;
	/**
	 * 角色名
	 */
	@ApiModelProperty(value = "角色名")
	private String roleName;
	/**
	 * 角色描述
	 */
	@ApiModelProperty(value = "角色描述")
	private String description;
	/**
	 * 排序
	 */
	@ApiModelProperty(value = "排序")
	private Integer sort;



	public RoleVo toVo(){
		RoleVo roleVo = new RoleVo();
		roleVo.setId(this.id);
		roleVo.setRoleType(this.roleType);
		roleVo.setRoleName(this.roleName);
		roleVo.setDescription(this.description);
		roleVo.setSort(this.sort);
		roleVo.setStatus(this.getStatus());
		return roleVo;
	}


}
